<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>pack (Casket)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/casket.rb, line 15</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pack</span> <span class="ruby-identifier">directory_path</span>
    <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span> <span class="ruby-identifier">directory_path</span>
    <span class="ruby-identifier">name</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">split</span>(<span class="ruby-ivar">@fs</span>).<span class="ruby-identifier">last</span>
    <span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span> <span class="ruby-node">&quot;**#{@fs}*&quot;</span>
    <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>([<span class="ruby-identifier">name</span>, <span class="ruby-ivar">@ext</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;.&quot;</span>), <span class="ruby-value str">&quot;wb&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tar</span><span class="ruby-operator">|</span>
      <span class="ruby-constant">Minitar</span>.<span class="ruby-identifier">pack</span>(<span class="ruby-identifier">files</span>, <span class="ruby-identifier">tar</span>)
    <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>